class CreateConnections < ActiveRecord::Migration
  def self.up
    create_table :connections do |t|
      t.string   "token"
      t.string   "remote_addr"
      t.integer  "gw_id",          :default => 0
      t.datetime "created_on"
      t.datetime "expires_on"
      t.datetime "updated_on"
      t.integer  "user_id"
      t.datetime "used_on"
      t.string   "ip"
      t.string   "mac"
      t.integer  "incoming_bytes", :default => 0
      t.integer  "outgoing_bytes", :default => 0
      t.integer  "access_node_id",                :null => false
      t.timestamps
    end
  end

  def self.down
    drop_table :connections
  end
end
